package model.technology;
import model.player.UnitManager;


public class UnitTechnologyTreeBuilder
{
	private UnitManager um;
	
	public UnitTechnologyTreeBuilder(UnitManager unitManager)
	{
		um = unitManager;
	}
	
	public UnitTechnologyTree buildTree()
	{
		UnitTechnologyTree tree = new UnitTechnologyTree(um);
		UnitVisibilityNode visibility = new UnitVisibilityNode(um);
		UnitDefensiveDamageNode defensiveDamage = new UnitDefensiveDamageNode(um);
		UnitUpkeepNode upkeep = new UnitUpkeepNode(um);
		UnitArmorNode armor = new UnitArmorNode(um);
		UnitMovementSpeedNode speed = new UnitMovementSpeedNode(um);
		UnitMaxHealthNode health = new UnitMaxHealthNode(um);
		health.addChild(armor);
		health.addChild(speed);
		upkeep.addChild(defensiveDamage);
		upkeep.addChild(health);
		visibility.addChild(upkeep);
		tree.setTechnologyTreeHead(visibility);
		tree.addAvailableTechnology(visibility);
		return tree;
	}
}